package com.zim.access.infrastructurre.protocol.ws;

import com.zim.access.infrastructurre.protocol.api.Provider;
import io.netty.channel.ChannelHandler;
import io.netty.handler.codec.http.HttpClientCodec;
import io.netty.handler.codec.http.HttpServerCodec;

/**
 * @author hanyue
 * @version 1.0
 * @date 2021/12/21 下午10:58
 */
public class WebsocketProvider implements Provider {

    @Override
    public ChannelHandler getEncoder() {
        return new HttpServerCodec();
    }

    @Override
    public ChannelHandler getDecoder() {
        return new HttpClientCodec();
    }

    @Override
    public ChannelHandler handler() {
        return new WebsocketHandler();
    }
}
